//
//  WLFileViewController.swift
//  LianTongSF
//
//  Created by Visitor on 2017/7/7.
//  Copyright © 2017年 万利. All rights reserved.
//

import UIKit

class WLFileViewController: WLBaseViewController {

    var topBgView: UIView?
    
    override func viewDidLoad() {
        super.viewDidLoad()
        setupStyle()
        setupUI()
    }
    
    private func setupUI() {
    
        let topView = Bundle.main.loadNibNamed("WLFileScrollView", owner: nil, options: nil)?.last as? WLFileScrollView
        topView?.frame.size.width = M_S.width;
        view.addSubview(topView!)
        topBgView = topView
        view.addSubview(scrollView)
        
        let midView = Bundle.main.loadNibNamed("WLFileMidView", owner: nil, options: nil)?.last as? WLFileMidView
        midView?.frame.size.width = M_S.width;
        scrollView.addSubview(midView!)
        scrollView.contentSize = CGSize(width: 0, height: midView!.frame.maxY + 10)
    }
    
    fileprivate lazy var scrollView: UIScrollView = {
        let scro = UIScrollView()
        scro.frame = CGRect(x: 0, y: self.topBgView!.frame.maxY, width: M_S.width, height: M_S.height - 64 - self.topBgView!.frame.size.height - 49)
        scro.backgroundColor = RGB_S(c: 235)
        scro.showsHorizontalScrollIndicator = false
        scro.alwaysBounceHorizontal = false
        scro.delegate = self
        return scro
    }()
    


}

extension WLFileViewController: UIScrollViewDelegate {

    

}
